<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    function getDate(){
        var date=new Date()
        var year=date.getFullYear()
        var y=date.getMonth()+1
        var r=date.getDate()
        var str='日一二三四五六'
        var xj=date.getDay()
        return `${year}年${y}月${r} 星期${str[xj]} ${date.toLocaleString().split(' ')[1]}`
    }
    document.write(getDate())
</script>